

#vpath %.h /usr/include/glad:/usr/include/GLFW
#vpath %.c ../sdk/src

TARGET  := demo
CC      := g++
LDFLAGS := -L/usr/local/lib -L/usr/lib -L/lib
LIBS    := -lglfw3 -lGL -ldl -lX11 -lpthread
#INCLUDE := /usr/include/glad/glad.h /usr/local/include/GLFW/glfw3.h


$(TARGET): main.o glad.o LoadShaders.o
	$(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
	
main.o: main.c
	$(CC) -c $^

glad.o: ../common/glad.c
	$(CC) -c $^

LoadShaders.o: ../common/LoadShaders.cpp
	$(CC) -c $^
	
.PHONY: clean
clean:
	-rm -fr *.o
	-rm -fr $(TARGET)
	-rm -fr *~
